﻿CREATE PROCEDURE [dbo].[Materials_Select]
	@ID INT = NULL , 
    @DoctorInCoursesID INT = NULL, 
    @File IMAGE = NULL
AS
	SELECT *
	from[CourseMaterials]
	where
	(
	   ( @ID is null or ID = @ID) AND
	   ( @DoctorInCoursesID is null or DoctorInCoursesID = @DoctorInCoursesID)
	)